package com.xbx.admin.annotation;

import com.xbx.baseweb.model.User;

/**
 * 请求上下文
 *
 * @author 89005691
 * @create 2018-10-08 14:57
 */
public class UserInfoContext {

    private static ThreadLocal<User> userInfo = new ThreadLocal<User>();
    public static String KEY_USERINFO_IN_HTTP_HEADER = "X-AUTO-FP-USERINFO";

    public UserInfoContext() {
    }

    public static User getUser() {
        return (User) userInfo.get();
    }

    public static void setUser(User user) {
        userInfo.set(user);
    }
}
